#ifndef __AUDIOSYSTEM_H
#define __AUDIOSYSTEM_H

/*
	AUDIOSYSTEM.H

	The CAudioSystem class

	Author: Kevin Hawkins
	Date: 3/28/2001
	Description: The CAudioSystem class is the controller for creating and
			     playing CAudio objects.

*/

#include <SDL/SDL.h>
#include <SDL_mixer/SDL_mixer.h>
#include "audio.h"

/*
	The CAudioSystem class
*/
class CAudioSystem
{
private:
	int NumChannels;
	Mix_Music *music;

public:
	CAudioSystem(int num_channels = 64);
	~CAudioSystem();

	CAudio *Create(char *filename, bool is3DSound);
	
	void Play(CAudio *audio, bool loop);
	void Stop(CAudio *audio);

	bool IsPlaying(CAudio *audio);

	void PlayMusic(char *filename, int repeat);
	void StopMusic();
	void SetMusicVolume(int volume);
	bool IsMusicPlaying();

	void SetListenerPos(float cameraX, float cameraY, float cameraZ) {}
	void SetListenerOrientation(float forwardX, float forwardY, float forwardZ, float topX, float topY, float topZ) {}
};

#endif
